package decorator.runoob;

/**
 * 具体功能装饰器
 */
public class RedShapeDecorator
        extends ShapeDecorator {
 
   public RedShapeDecorator(Shape decoratedShape) {
      super(decoratedShape);     
   }
 
   @Override
   public void draw() {
      decoratedShape.draw();    //delegate 委托
      setRedBorder(decoratedShape);//enhance 增强功能
   }
 
   private void setRedBorder(Shape decoratedShape){
      System.out.println("Border Color: Red");
   }
}